<?php

namespace JLPay\Models\Openmerch\Change;

use JLPay\Models\BaseResponse;

/**
 * 结算规则修改响应参数
 */
class SettleRuleModifyResponse extends BaseResponse
{
    protected string $merchNo = '';  // 商户号
    protected string $applyId = '';  // 业务申请编号

    /**
     * 构造函数
     *
     * @param array|null $responseArray
     */
    public function __construct(?array $responseArray = null)
    {
        parent::__construct($responseArray);
        
        if ($responseArray) {
            $this->merchNo = $responseArray['merch_no'] ?? '';
            $this->applyId = $responseArray['apply_id'] ?? '';
        }
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        $data['merch_no'] = $this->merchNo;
        $data['apply_id'] = $this->applyId;
        return $data;
    }
} 